import {Dimensions,Platform,PixelRatio} from 'react-native'

const deviceWidth=Dimensions.get("window").width;
const layoutWidth=750;
export default  function px(size){
    if(PixelRatio.get()>=3&&Platform.OS=="ios"&&size===1){
        return size;
    }
    return deviceWidth/layoutWidth*size;
}